#include <iostream>
#include <iomanip>

class Solution
{
public:
    int main()
    {
        int power;
        std::cin >> power;
        double cost = 0.0;
        if (power <= 150)
        {
            cost = 0.4463 * power;
        }
        else if (power <= 400)
        {
            cost = 0.4463 * 150 + 0.4663 * (power - 150);
        }
        else
        {
            cost = 0.4463 * 150 + 0.4663 * 250 + 0.5663 * (power - 400);
        }
        std::cout << std::fixed << std::setprecision(1) << cost;
        return 0;
    }
};

#ifndef __LOCAL_TEST__
int main()
{
    return Solution().main();
}
#endif